function preview(data) {
    for (var k in data) {
        data = data[k];
        break;
    }
    function set(x, n, v) {
        var y = document.getElementById(x); 
        if (y && v) {
            y[n] = v;
        }
        if (y && !v) {
            y.parentNode.removeChild(y);
        }
    }    
    window.setTimeout(function () {
        set("thumbnail", "src", data.thumbnail_url);
        set("info", "href", data.info_url);
        set("preview", "href", data.preview_url);
    }, 1000);
}
